<%@ page language="java" pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
  		<title><fmt:message key="policyList.heading"/></title>
  </head>
  <body>	
  			<div class="op-div">
	  			<a href="editPolicy.do" class="add">添加</a>
	  			<a href="#" onclick="multiDelete('policyId');" class="delete">删除</a>
  			</div>
	  		<div class="post">
				<div class="story">
					<h3><fmt:message key="policyList.heading"/></h3>
						功能介绍:
						[TODO]
						<div id="query-form">
							打开注释，添加相应的查询字段［TODO］
							<!--
							<form id="tableForm" name="tableForm" action="policys.do" method="Post">
					    		<table width="96%" class="query-table" >
					    			<tr>
					    				<th>用户姓名</th>
					    				<td><input type="text" name="Q_fullname_S_LK" value="${param['Q_fullname_S_LK']}"/></td>
					    				<th>包括角色名称</th>
					    				<td><input type="text" name="Q_roles.roleName_S_LK" value="${param['Q_roles.roleName_S_LK']}"/></td>
					    			</tr>
					    			<tr>
					    				<td colspan="4" align="center">
					    					<input type="submit" value="查 询" class="query-btn"/>
					    					&nbsp;
					    					<input type="button" value="重 置" class="reset-btn" onclick="this.form.reset();"/>
					    				</td>
					    			</tr>
					    		</table>
				    		</form>
				    		-->
			    		</div>
				</div>
			</div>
    		<c:set var="checkAll">
	  			<input type="checkbox" name="ckAll" onclick="checkAll(this,'policyId');"/>
	  		</c:set>
    		<div id="div-data">
		    	<display:table name="policys" sort="external" pagesize="${policys.objectsPerPage}"
			    	cellpadding="0" cellspacing="0" style="width:98%" export="true" 
			    	id="policyItem" partialList="true" size="${policys.fullListSize}" requestURI="policys.do">
			    	<display:column title="${checkAll}" media="html" style="width:8px;align:center">
				  		<input type="checkbox" name="policyId" value="${policyItem.policyId}">
				  	</display:column>
				<display:column property="flightCode" titleKey="policy.flightCode" sortName="flightCode" sortable="true"/>  
				<display:column titleKey="航段">
					${policyItem.dpt}-${policyItem.arr}
				</display:column>  
				<display:column property="flightNumLimit" titleKey="policy.flightNumLimit" sortName="flightNumLimit" sortable="true"/>  
				<display:column property="cabin" titleKey="policy.cabin" sortName="cabin" sortable="true"/> 
				<display:column titleKey="政策类型">
						<c:if test="${policyItem.policyType}==1">
						包机
					</c:if>
					<c:if test="${policyItem.policyType}==2">普通</c:if>
					<c:if test="${policyItem.policyType}==3">申请</c:if>
					<c:if test="${policyItem.policyType}==4">预付</c:if>
					<c:if test="${policyItem.policyType}==5">低价</c:if>
				</display:column> 
				<display:column titleKey="旅行有效期">
					<fmt:formatDate value="${policyItem.startDate}" pattern="yyyy-MM-dd"/>
					<fmt:formatDate value="${policyItem.endDate}" pattern="yyyy-MM-dd"/>
				</display:column>
				<display:column titleKey="销售有效期">
					<fmt:formatDate value="${policyItem.startdateTicket}" pattern="yyyy-MM-dd"/>
					<fmt:formatDate value="${policyItem.enfdateTicket}" pattern="yyyy-MM-dd"/>
				</display:column>
				<display:column property="beforeValidDay" titleKey="policy.beforeValidDay" sortName="beforeValidDay" sortable="true"/>  
				<display:column property="discountValue" titleKey="policy.discountValue" sortName="discountValue" sortable="true"/>  
				<display:column property="policyCode" titleKey="policy.policyCode" sortName="policyCode" sortable="true"/>  
					<display:column media="html" title="管理" style="width:170px">
						<a href="editPolicy.do?policyId=${policyItem.policyId}" class="update">修改</a>
						<a href="#" class="view" onclick="viewDetail('policyId',${policyItem.policyId})" >查看</a>
						<a href="#" class="delete" onclick="deleteObj('policyId',${policyItem.policyId})">删除</a>
					</display:column>
				 </display:table>	
			</div>
			<script type="text/javascript">
				highlightTableRows('policyItem');
			</script>
	</body>
</html>